﻿@model EditProfileModel
@{ ViewBag.Title = "Edit Profile"; }

@using (Html.BeginForm(null, null, FormMethod.Post, new { autocomplete = "off" })) {
    <article id="editProfile">
        <h1>Edit Your Profile</h1>

        @Html.ValidationSummary(true)
        @Html.AntiForgeryToken()
        
        <div class="fieldRow">
            <label for="Username">Email <span class="gray">(will never be displayed on site)</span></label>
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>
                   
        <div class="fieldRow">
            <label for="Username">Twitter</label>
            @Html.EditorFor(model => model.TwitterUsername)
            @Html.ValidationMessageFor(model => model.TwitterUsername)
        </div>     
              
        <div class="fieldRow">
            <label for="Username">Website</label>
            @Html.EditorFor(model => model.Website)
            @Html.ValidationMessageFor(model => model.Website)
        </div>    

        <hr />  
        
        <div class="fieldRow">
            <label for="Password">Password <span class="gray">(leave empty to keep your old password)</span></label>
            @Html.EditorFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>    
    
        <div class="fieldRow">
            <label for="Password">Confirm your password</label>
            @Html.EditorFor(model => model.ConfirmPassword)
            @Html.ValidationMessageFor(model => model.ConfirmPassword)
        </div> 

        <hr />  


        <div class="buttonRow compactForm">
            <a href="@Url.Action("Profile", new { username = this.ViewContext.RouteData.Values["username"] })" id="cancelLink">cancel</a>
            <input type="submit" value="Save" />
        </div>

        <script src="@Url.Content("~/assets/scripts/lib/jquery.validate.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/assets/scripts/lib/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

    </article>

}